<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script type="text/javascript">
      new Promise((resolve) => {
        setTimeout(() => {
          resolve("报名成功");
        }, 1000);
      })
        .then((value) => {
          console.log(value); // 报名成功
          return new Promise((resolve, reject) => {
            setTimeout(() => {
              // resolve("学习");
              reject("学习失败");
            }, 1000);
          });
        })
        .then((value) => {
          console.log(value);
          return new Promise((resolve) => {
            setTimeout(() => {
              resolve("整理简历");
            }, 1000);
          });
        },reason=>{
            console.log(reason);  // 学习失败
        })
        .then((value) => {
          console.log(value);
          return new Promise((resolve) => {
            setTimeout(() => {
              resolve("面试");
            }, 1000);
          });
        })
        .then((value) => {
          console.log(value);
          return new Promise((resolve) => {
            setTimeout(() => {
              resolve("上班");
            }, 1000);
          });
        })
        .then((value) => {
          console.log(value);
        })
        .catch((reason) => {
          console.log(reason);
        });



    </script>
  </body>
</html>
